;	This code doesn't bloody work

;	Menu hack
.long				0xC0DE0000
.long				0x00000000

LUI	S0,		0x800A	;
LB	S0,	0x5060	(S0)	;S0 = menu mode byte
ORI	S1,	R0,	0x0001	;S1 = multiplayer mode value
LUI	S2,		0x800A	;S2 = 0x800A0000
BEQL	S0,	S0,		Menu_Hack_Store
SB	S1,	0x4FC4	(S2)	;Force multiplayer mode in multi...
				Menu_Hack_Store:
LUI	S3,		0x8010	;
LB	S3,	0x5304	(S3)	;
ORI	S4,	R0,	0x0010	;...unless Start is pressed,
BEQL	S3,	S4,		Menu_Hack_Clear
SB	R0,	0x4FC4	(S2)	;in which case, force single player mode to get menu working
				Menu_Hack_Clear:
;LB	S4,	0x4FD0	(S2)	;S4 is number of players
;	TODO: Remove this
ORI	S4,	R0,	0x0002	;Debug line to see if code works with fixed value
;-------------------------------;(using the number of players variable seems
;-------------------------------;to be causing issues)
SB	S4,	0x325D	(S2)	;Split the screen appropriately
JR	RA			;Return
NOP

.align				3
.long				0xE0000000
.long				0x00000000
;	End of Menu Hack
